﻿using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MiniGOQO
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void listView1_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.KeyCode == System.Windows.Forms.Keys.Up))
            {
                // Up
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Down))
            {
                // Down
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Left))
            {
                // Left
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Right))
            {
                // Right
            }

            if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
            {
                // Enter
                if (listView1.SelectedIndices[0] == 0)//美食
                {
                    FoodForm ff = new FoodForm();
                    ff.Show();
                    this.Hide();
                    
                }
                else if (listView1.SelectedIndices[0] == 1)//个人空间
                {
                    MySpaceForm msf = new MySpaceForm();
                    msf.Show();
                    this.Hide();
                }
                else if (listView1.SelectedIndices[0] == 2)//红人馆
                {
                    HotmanForm hf = new HotmanForm();
                    hf.Show();
                    this.Hide();
                }
                else if (listView1.SelectedIndices[0] == 3)//圈子
                {
                    GroupForm gf = new GroupForm();
                    gf.Show();
                    this.Hide();
                }
            }
        }

        private void menuItem1_Click(object sender, EventArgs e)//返回登录界面
        {
            LoginForm lf = new LoginForm();
            lf.Show();
            this.Hide();
        }

        private void menuItem2_Click(object sender, EventArgs e)//退出
        {
            this.Dispose();
        }

    }
}